package day8

import Utils.SparkUtils
import org.apache.spark.SparkContext
import org.apache.spark.sql.{DataFrame, SparkSession}

object Test_Spark_Hive {
  def main(args: Array[String]): Unit = {
    val spark = SparkSession.builder().master("local[*]").appName("ceshi1").enableHiveSupport().getOrCreate()
    import spark.implicits._
    val df = spark.sql(""" select * from test_hive.t_user """)
    df.show()

    spark.stop()
  }

}
